<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="jquery.js"></script>
		<script src="jquery.cookie.js"></script>
		<script>
			$(function(){
				$("#btn").click(function(){
					var tex=$(".tex").val().trim();
					$.cookie("sname",tex);
				})
				$('p').text($.cookie("sname"));
			})
		</script>
	</head>
	<body>
		<input type="text" class="tex" />
		<input type="button" id="btn" value="cookie"/>
		<p></p>
	</body>
</html>
